package com.example.pages;

import java.awt.List;
import java.util.Iterator;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import org.openqa.selenium.support.FindBy;

public class FilmListPage extends InternalPage {
	
	@FindBy (className = "imdbresult")
	public java.util.List<WebElement> linksToFilms;
	
	
	@FindBy (className = "imdbresult")
	public WebElement linkToFilm;
	
	public void openFilmPage(String filmName)	{
		
				
		Iterator<WebElement> it = linksToFilms.iterator();
		it.next().findElement(By.linkText(filmName)).click();		
		
	}
}


